// GpsMsgConverter.cpp : implementation file
//

#include "stdafx.h"
#include "NaviService.h"
#include "GpsMsgConverter.h"


// CGpsMsgConverter dialog

IMPLEMENT_DYNAMIC(CGpsMsgConverter, CDialog)

CGpsMsgConverter::CGpsMsgConverter(CWnd* pParent /*=NULL*/)
	: CDialog(CGpsMsgConverter::IDD, pParent)
{

}

CGpsMsgConverter::~CGpsMsgConverter()
{
}

void CGpsMsgConverter::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
}


BEGIN_MESSAGE_MAP(CGpsMsgConverter, CDialog)
	ON_WM_CREATE()
	ON_MESSAGE(WM_NAVI_TRANSER_EXIT,OnNaviTransferIgoExit)
	ON_MESSAGE(WM_NAVI_TRANSER_MOBILE_NAVI,OnNaviTransferIgoExit)
END_MESSAGE_MAP()


// CGpsMsgConverter message handlers

int CGpsMsgConverter::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
	if (CDialog::OnCreate(lpCreateStruct) == -1)
		return -1;

	// TODO:  Add your specialized creation code here

	return 0;
}

LRESULT CGpsMsgConverter::OnNaviTransferIgoExit( WPARAM wParam, LPARAM lParam )
{

	switch(wParam)
	{
	case WPARAM_MAP_MINI_IGO:
	case WPARAM_MAP_MINI_MOBILE_NAVI:
		::PostMessage(HWND_BROADCAST,WM_NAVI_IGO_EXIT,LWPARAM_MAP_MINI,0);
		break;
	default:
		GD_DBG_LOG("OnNaviTransferIgoExit not handle:%x %x",wParam,lParam);
		break;
	}
	return 0 ;
}
